package com.yanqu.road.entity.activity.peakstronghold;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;

// 据点战联盟缓存数据
@FieldTypeAnnotation(tableName = "t_c_activity_peak_stronghold_cache", autoSave = true)
public class CrossPeakStrongholdCacheData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, desc = "活动id", isIndex = true)
    private int activityId;
    @FieldTypeAnnotation(select = true, update = true, desc = "商会分组", isIndex = true)
    private int unionGroup;
    @FieldTypeAnnotation(desc = "回合数")
    private int round;
    @FieldTypeAnnotation(desc = "阶段值")
    private int stageType;
    @FieldTypeAnnotation(desc = "等待上传结束的服务器列表")
    private List<Long> waitServerIds;
    @FieldTypeAnnotation(desc = "最小开服时间")
    private long minOpenTime;
    @FieldTypeAnnotation(desc = "等待异常")
    private int waitError;

    public CrossPeakStrongholdCacheData() {
    }

    public CrossPeakStrongholdCacheData(int activityId, int unionGroup) {
        this.activityId = activityId;
        this.unionGroup = unionGroup;
        setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setUpdateOption();
        }
    }

    public int getStageType() {
        return stageType;
    }

    public void setStageType(int stageType) {
        if (this.stageType != stageType) {
            this.stageType = stageType;
            setUpdateOption();
        }
    }

    public List<Long> getWaitServerIds() {
        return waitServerIds;
    }

    public void setWaitServerIds(List<Long> waitServerIds) {
        this.waitServerIds = waitServerIds;
    }

    public long getMinOpenTime() {
        return minOpenTime;
    }

    public void setMinOpenTime(long minOpenTime) {
        if (this.minOpenTime != minOpenTime) {
            this.minOpenTime = minOpenTime;
            setUpdateOption();
        }
    }

    public int getWaitError() {
        return waitError;
    }

    public void setWaitError(int waitError) {
        if (this.waitError != waitError) {
            this.waitError = waitError;
            setUpdateOption();
        }
    }

    public int getUnionGroup() {
        return unionGroup;
    }

    public void setUnionGroup(int unionGroup) {
        this.unionGroup = unionGroup;
    }
}
